#if !USE_CONSOLE

#ifndef SCENE_PANEL_H
#define SCENE_PANEL_H

#include <QWidget>
#include <QtGui>

#include "src/interface/treeWidget.h"

#include "src/scene/scene.h"

class ScenePanel : public QWidget {
	Q_OBJECT

    public:
        ScenePanel(GLWidget *, QWidget * = 0, Scene * = NULL);
        ~ScenePanel();

        TreeWidget *getObjectsTree(){return objectsTree;};
        TreeWidget *getLightsTree(){return lightsTree;};

        void setScene(Scene *);

        void update(Scene * = NULL, std::vector<Object *> * = NULL);

    public slots:
        void duplicateObject(){objectsTree->duplicateObject(scene);};
        void deleteObject(Object *_o) {scene->deleteObject(_o);};
        void addObject(Object *_o) {scene->addObject(_o);};
        void deleteObjects(){objectsTree->deleteItens(scene);};
        void deleteLights(){lightsTree->deleteItens(scene);};
        void unionOperation(){objectsTree->unionOperation(scene);};
        void intersectionOperation(){objectsTree->intersectionOperation(scene);};
        void differenceOperation(){objectsTree->differenceOperation(scene);};

    private slots:
        void changeBackground();

    private:
        double backgroundR, backgroundG, backgroundB;
        Scene *scene;
        TreeWidget *objectsTree;
        TreeWidget *lightsTree;

        QPushButton *backgroundPushButton;

        void setButtonColor();
        void addFirstLights();
};

#endif
#endif //!USE_CONSOLE
